package com.itwanyan.m3u8loaderbypublic.dbdata;

import org.litepal.annotation.Column;
import org.litepal.crud.DataSupport;

/**
 * 下载记录的Bean
 */

public class LoadRecordBean extends DataSupport{
    @Column(unique = true)
    private String videoId;
    private String loadUrl;
    private String basePath;
    private int totalTsCount;
    private int loadTsCount;
    private long fileLength;// totalTsCount * 单个Ts文件的大小
    private long loadLength;//已下载的文件的长度
    private int  finishState;//
    private String videoName;//视频文件的文件名
    public LoadRecordBean() {
    }

    public LoadRecordBean(String videoId, String loadUrl, String basePath,int totalTsCount, int loadTsCount, long fileLength,int finishState) {
        this.videoId = videoId;
        this.loadUrl = loadUrl;
        this.basePath = basePath;
        this.totalTsCount = totalTsCount;
        this.loadTsCount = loadTsCount;
        this.fileLength = fileLength;
        this.finishState = finishState;
    }

    public String getVideoId() {
        return videoId;
    }

    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }

    public String getLoadUrl() {
        return loadUrl;
    }

    public void setLoadUrl(String loadUrl) {
        this.loadUrl = loadUrl;
    }

    public int getTotalTsCount() {
        return totalTsCount;
    }

    public void setTotalTsCount(int totalTsCount) {
        this.totalTsCount = totalTsCount;
    }

    public int getLoadTsCount() {
        return loadTsCount;
    }

    public void setLoadTsCount(int loadTsCount) {
        this.loadTsCount = loadTsCount;
    }
    public long getFileLength() {
        return fileLength;
    }

    public void setFileLength(long fileLength) {
        this.fileLength = fileLength;
    }
    public int getFinishState() {
        return finishState;
    }

    public void setFinishState(int finishState) {
        this.finishState = finishState;
    }

    public String getBasePath() {
        return basePath;
    }

    public void setBasePath(String basePath) {
        this.basePath = basePath;
    }

    public long getLoadLength() {
        return loadLength;
    }

    public void setLoadLength(long loadLength) {
        this.loadLength = loadLength;
    }

    public String getVideoName() {
        return videoName;
    }

    public void setVideoName(String videoName) {
        this.videoName = videoName;
    }

    @Override
    public String toString() {
        return "LoadRecordBean{" +
                "videoId='" + videoId + '\'' +
                ", loadUrl='" + loadUrl + '\'' +
                ", basePath='" + basePath + '\'' +
                ", totalTsCount=" + totalTsCount +
                ", loadTsCount=" + loadTsCount +
                ", fileLength=" + fileLength +
                ", loadLength=" + loadLength +
                ", finishState=" + finishState +
                '}';
    }
}
